package com.mg.service;

import com.github.pagehelper.PageInfo;
import com.mg.common.ResponseJson;
import com.mg.dto.SimpleResult;
import com.mg.dto.UserDto;
import com.mg.model.BankCard;
import com.mg.model.User;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by mg1213 on 2018/3/17.
 */
public interface UserService {
    User login(HttpServletRequest request,User user);
    ResponseJson<User> register(User user);
    int insertUser(User user);
    ResponseJson<User> editPass(User user,String newPass);
    ResponseJson<User> getUserPass(User user);
    PageInfo<UserDto> selectPageInfo(UserDto dto, int start, int limit);
    List<BankCard> getBankCardByUserId(Integer userId);
    SimpleResult deleteUser(String ids);

    Map<String,Object> selectUserById(Integer id);

    SimpleResult updateUser(String userStr, String bankcards);

    List<User> getAllUsers();

    User getUser(Integer id);

    SimpleResult updateUser(User user);

    PageInfo<BankCard> getBankInfo(Integer userId);

    SimpleResult saveBankInfo(BankCard bankCard);

    SimpleResult deleteBankInfo(String ids, Integer userId);
}
